@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap");

:root {
    --pink-100: #ffeaf3;
    --pink-200: #ffcee3;
    --pink-400: #ff7ab7;
    --pink-500: #ff58a4;
    --pink-600: #ff3f99;
    --lavender-100: #f1efff;
    --lavender-300: #c6b8ff;
    --lavender-500: #9f8bff;
    --midnight-200: #514a6a;
    --midnight-500: #28213f;
    --midnight-700: #1a152b;
    --gray-50: #fbfbfd;
    --gray-100: #f2f1f8;
    --gray-200: #e3e0ef;
    --gray-300: #c9c4dd;
    --gray-500: #8d87a2;
    --gray-700: #4d4765;
    --white: #ffffff;
    --shadow-soft: 0 18px 38px rgba(255, 122, 183, 0.22);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --transition: all 0.25s ease;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Poppins", "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--gray-700);
    background: linear-gradient(135deg, var(--pink-100), var(--pink-200));
}

[v-cloak] {
    display: none !important;
}

.app-root {
    display: flex;
    min-height: 100vh;
    gap: 24px;
}

.sidebar {
    width: 240px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
    border-radius: 0 32px 32px 0;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.theme-midnight .sidebar {
    background: rgba(38, 32, 60, 0.9);
    color: #f7f5ff;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--pink-200);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-info h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.sidebar-info p {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--gray-500);
}

.theme-midnight .sidebar-info p {
    color: rgba(255, 255, 255, 0.7);
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.menu-item {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 10px 12px;
    background: transparent;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    color: inherit;
    transition: var(--transition);
}

.menu-item:hover {
    background: rgba(255, 122, 183, 0.15);
}

.menu-item.active {
    background: linear-gradient(135deg, var(--pink-400), var(--pink-500));
    color: #fff;
    box-shadow: 0 12px 22px rgba(255, 122, 183, 0.25);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-primary,
.btn-link {
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.btn-primary {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--pink-400), var(--pink-500));
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 26px rgba(255, 122, 183, 0.28);
}

.btn-primary.btn-danger {
    background: linear-gradient(135deg, #ff4d6d, #ff6f91);
    box-shadow: 0 16px 24px rgba(255, 79, 109, 0.35);
}

.btn-primary.btn-danger:hover {
    box-shadow: 0 18px 30px rgba(255, 79, 109, 0.45);
}

body.theme-midnight .btn-primary.btn-danger {
    background: linear-gradient(135deg, #ff5e7a, #ff3d63);
}

.btn-link {
    background: none;
    color: var(--pink-500);
    padding: 8px;
}

.btn-link[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.block {
    width: 100%;
}

.main {
    flex: 1;
    padding: 32px 48px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.main-header h1 {
    margin: 0;
    font-size: 28px;
}

.subtitle {
    margin: 6px 0 0;
    color: var(--gray-500);
    font-size: 13px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-buttons {
    display: flex;
    gap: 10px;
}

.theme-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.theme-dot.pink { background: linear-gradient(135deg, var(--pink-400), var(--pink-500)); }
.theme-dot.lavender { background: linear-gradient(135deg, var(--lavender-300), var(--lavender-500)); }
.theme-dot.midnight { background: linear-gradient(135deg, #3b315c, var(--midnight-500)); }

.theme-dot.active {
    border-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

.header-date {
    font-weight: 600;
    color: var(--pink-600);
}

.content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.86);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--pink-500);
    font-size: 16px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(255, 122, 183, 0.25);
    border-top-color: var(--pink-500);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

[v-cloak] {
    display: none !important;
}

a {
    color: inherit;
    text-decoration: none;
}

.hidden {
    display: none !important;
}

body.theme-pink {
    background: linear-gradient(135deg, var(--pink-100), var(--pink-200));
}

body.theme-lavender {
    background: linear-gradient(135deg, var(--lavender-100), #f7f4ff);
}

body.theme-midnight {
    background: radial-gradient(circle at 25% 25%, #3c3458 0%, var(--midnight-700) 70%);
    color: #f6f5ff;
}

.app-shell {
    min-height: 100vh;
    padding: 32px;
    gap: 24px;
}

.app-aside {
    background: rgba(255, 255, 255, 0.88);
    border-radius: var(--radius-lg);
    padding: 24px 18px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

body.theme-midnight .app-aside {
    background: rgba(33, 28, 54, 0.85);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}

.aside-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.aside-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 122, 183, 0.45), rgba(255, 122, 183, 0.25));
    display: flex;
    align-items: center;
    justify-content: center;
}

.aside-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.aside-info h2 {
    font-size: 20px;
    margin: 0;
    font-weight: 600;
}

.aside-info p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--gray-500);
}

body.theme-midnight .aside-info p {
    color: rgba(255, 255, 255, 0.68);
}

.aside-menu {
    border-right: none;
    background: transparent;
    flex: 1;
}

.aside-menu .el-menu-item {
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    height: 44px;
    line-height: 44px;
}

.aside-menu .el-menu-item.is-active {
    background: linear-gradient(135deg, var(--pink-400), var(--pink-500));
    color: var(--white);
    box-shadow: 0 12px 24px rgba(255, 122, 183, 0.28);
}

body.theme-lavender .aside-menu .el-menu-item.is-active {
    background: linear-gradient(135deg, var(--lavender-300), var(--lavender-500));
    box-shadow: 0 12px 24px rgba(159, 139, 255, 0.28);
}

body.theme-midnight .aside-menu .el-menu-item.is-active {
    background: linear-gradient(135deg, #5f56a0, #4b3d92);
    box-shadow: 0 12px 28px rgba(59, 48, 118, 0.42);
}

.aside-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

body.theme-midnight .app-header {
    background: rgba(34, 29, 56, 0.88);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.header-left h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.header-sub {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--gray-500);
}

body.theme-midnight .header-sub {
    color: rgba(255, 255, 255, 0.65);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.theme-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.header-date {
    font-weight: 600;
    font-size: 16px;
    color: var(--pink-600);
}

body.theme-lavender .header-date {
    color: var(--lavender-500);
}

body.theme-midnight .header-date {
    color: #f3c9ff;
}

.app-main {
    padding: 0;
    background: none;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.theme-midnight .stat-card {
    background: rgba(35, 30, 58, 0.9);
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.38);
}

.stat-card h3 {
    margin: 0;
    font-size: 14px;
    color: var(--gray-500);
}

.stat-value {
    font-size: 30px;
    font-weight: 700;
}

.card {
    background: rgba(255, 255, 255, 0.94);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 24px;
    margin-bottom: 24px;
}

body.theme-midnight .card {
    background: rgba(35, 30, 58, 0.9);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.32);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.card-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--gray-500);
}

body.theme-midnight .card-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

.card-actions {
    display: flex;
    gap: 10px;
}

.grid-2 {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-item {
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--gray-50);
    border: 1px solid transparent;
    transition: var(--transition);
}

.timeline-item:hover {
    border-color: rgba(255, 122, 183, 0.4);
    transform: translateY(-2px);
}

body.theme-midnight .timeline-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(255, 122, 183, 0.12);
    color: var(--pink-500);
}

body.theme-midnight .tag {
    background: rgba(255, 255, 255, 0.1);
    color: #f5caff;
}

.note-card {
    border-radius: 18px;
    padding: 20px;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    color: #3b3351;
}

.note-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
    pointer-events: none;
    z-index: 0;
}

.note-card > * {
    position: relative;
    z-index: 1;
}

.note-footer,
.note-actions,
.note-actions button {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.note-card h4 {
    margin: 0 0 12px;
    font-size: 18px;
}

.note-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.media-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.media-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-card img,
.media-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-card .media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(10, 8, 20, 0.78) 100%);
    color: #fff;
    padding: 12px 16px;
    font-size: 13px;
}

.quote-card {
    padding: 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.quote-card::before {
    content: "❝";
    position: absolute;
    top: 12px;
    left: 18px;
    font-size: 42px;
    opacity: 0.18;
}

.quote-text {
    font-size: 16px;
    line-height: 1.7;
    margin: 12px 0 0;
    white-space: pre-wrap;
}

.quote-meta {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
}

.form-inline {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cover-preview {
    width: 120px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--gray-200);
}

.cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.preview-image {
    max-width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.fade-slide-enter-active,
.fade-slide-leave-active {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.fade-slide-enter-from,
.fade-slide-leave-to {
    opacity: 0;
    transform: translateY(12px);
}

/* 登录页样式 */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    background: radial-gradient(circle at 15% 15%, rgba(255, 122, 183, 0.35), transparent 55%),
                radial-gradient(circle at 85% 25%, rgba(159, 139, 255, 0.28), transparent 60%),
                linear-gradient(135deg, var(--pink-100), var(--lavender-100));
}

.login-wrapper {
    width: 100%;
    max-width: 880px;
}

.login-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--radius-lg);
    box-shadow: 0 28px 52px rgba(35, 30, 58, 0.18);
    padding: 36px 44px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    backdrop-filter: blur(18px);
}

.login-brand h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--pink-600);
}

.login-brand p {
    margin: 14px 0 0;
    font-size: 16px;
    color: var(--gray-500);
    line-height: 1.7;
}

.login-forms {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-form h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
}

.login-form input {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    font-size: 14px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.92);
}

.login-form input:focus {
    border-color: var(--pink-400);
    box-shadow: 0 0 0 3px rgba(255, 122, 183, 0.18);
    outline: none;
}

.primary-btn {
    padding: 12px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--pink-400), var(--pink-500));
    border: none;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(255, 122, 183, 0.28);
}

.primary-btn.full {
    width: 100%;
}

.switch-tip {
    font-size: 13px;
    text-align: center;
    color: var(--gray-500);
}

.switch-tip a {
    color: var(--pink-500);
    font-weight: 600;
}

.form-message {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    display: none;
}

.form-message.show {
    display: block;
}

.form-message.error {
    background: rgba(255, 122, 122, 0.12);
    color: #d93030;
    border: 1px solid rgba(217, 48, 48, 0.25);
}

.form-message.success {
    background: rgba(122, 214, 115, 0.12);
    color: #2f9a42;
    border: 1px solid rgba(47, 154, 66, 0.3);
}

@media (max-width: 960px) {
    .app-shell {
        padding: 16px;
        flex-direction: column;
    }

    .app-aside {
        width: 100% !important;
        flex-direction: row;
        align-items: center;
        gap: 18px;
    }

    .aside-menu {
        flex: 1;
        display: none;
    }

    .login-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }
}
.action-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-secondary {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: none;
    background: rgba(255, 90, 164, 0.2);
    color: var(--pink-600);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 90, 164, 0.3);
    transform: translateY(-1px);
}

.btn-text {
    border: none;
    background: none;
    color: var(--pink-500);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-text:hover {
    background: rgba(255, 90, 164, 0.12);
}

.btn-text.danger {
    color: #d93030;
}

.list-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.list-item {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 18px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.list-item:hover {
    border-color: rgba(255, 122, 183, 0.36);
    box-shadow: 0 12px 30px rgba(255, 122, 183, 0.12);
}

body.theme-midnight .list-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.list-item-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.list-item-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.list-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.list-cover {
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-height: 160px;
    cursor: pointer;
}

.list-cover img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.muted {
    color: var(--gray-500);
    font-size: 12px;
    display: flex;
    gap: 12px;
}

.timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 16px;
}

.timeline-actions {
    display: flex;
    gap: 8px;
}

.media-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.note-actions {
    display: flex;
    gap: 8px;
}

.quote-cover {
    margin-bottom: 12px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.quote-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.form-field.full {
    grid-column: 1 / -1;
}

.form-field label {
    font-weight: 600;
}

.form-field input,
.form-field textarea,
.form-field select {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    font-size: 14px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.95);
}

.form-field textarea {
    resize: vertical;
    min-height: 96px;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--pink-400);
    box-shadow: 0 0 0 3px rgba(255, 122, 183, 0.18);
    outline: none;
}

.hint {
    font-size: 12px;
    color: var(--gray-500);
}

.upload-preview {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.upload-preview img,
.upload-preview video {
    width: 140px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--gray-300);
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 90, 164, 0.1);
    color: var(--pink-600);
    font-size: 12px;
    font-weight: 600;
}

.badge-soft {
    background: rgba(159, 139, 255, 0.15);
    color: var(--lavender-500);
}

.badge-warning {
    background: rgba(255, 206, 227, 0.28);
    color: var(--pink-600);
}

.badge-LOW {
    background: rgba(122, 214, 115, 0.18);
    color: #2f9a42;
}

.badge-MEDIUM {
    background: rgba(255, 122, 183, 0.18);
    color: var(--pink-600);
}

.badge-HIGH {
    background: rgba(255, 107, 107, 0.2);
    color: #d93030;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 20, 52, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 999;
    backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    width: min(760px, 100%);
    max-height: 90vh;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
}

body.theme-midnight .modal {
    background: rgba(30, 25, 50, 0.96);
    color: #f7f5ff;
}

.modal-header,
.modal-footer {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-footer {
    border-bottom: none;
    border-top: 1px solid var(--gray-200);
    justify-content: flex-end;
}

body.theme-midnight .modal-header,
body.theme-midnight .modal-footer {
    border-color: rgba(255, 255, 255, 0.12);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.confirm-dialog {
    text-align: center;
    padding: 8px 4px;
}

.confirm-dialog .confirm-message {
    margin: 0;
    font-size: 16px;
    color: var(--gray-700);
    line-height: 1.7;
}

.confirm-dialog .confirm-note {
    margin: 14px 0 0;
    color: var(--gray-500);
    font-size: 13px;
    line-height: 1.6;
}

body.theme-midnight .confirm-dialog .confirm-message {
    color: #f7f5ff;
}

body.theme-midnight .confirm-dialog .confirm-note {
    color: rgba(255, 255, 255, 0.7);
}

.modal-close {
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
    color: inherit;
}

.modal-submit.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.modal-submit.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-top-color: transparent;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 0.8s linear infinite;
}

.toast-host {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.toast {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: rgba(40, 33, 63, 0.88);
    color: #fff;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.25s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-info {
    background: rgba(159, 139, 255, 0.92);
}

.toast-success {
    background: rgba(122, 214, 115, 0.92);
}

.toast-error {
    background: rgba(255, 114, 114, 0.92);
}

.media-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.media-list .media-item {
    width: 140px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-700);
}

.media-list .media-item img,
.media-list .media-item video {
    width: 100%;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.caption-input {
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    font-size: 12px;
}

.diary-detail {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.diary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--gray-500);
}

.diary-content p {
    white-space: pre-wrap;
    line-height: 1.7;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@media (max-width: 640px) {
    .modal {
        max-height: 95vh;
    }
    .modal-body {
        padding: 16px;
    }
}

.timeline-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.timeline-thumb {
    width: 84px;
    height: 84px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    background: rgba(255, 122, 183, 0.1);
}

.timeline-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.list-cover.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: rgba(255, 122, 183, 0.1);
    color: var(--gray-500);
    font-size: 13px;
    letter-spacing: 1px;
}




.timeline-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--gray-500);
    text-align: center;
    padding: 4px;
}

.note-cover {
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-height: 140px;
    cursor: pointer;
}

.note-cover img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    pointer-events: none;
    display: block;
}

.media-display {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    max-height: 220px;
}

.media-display img,
.media-display video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.media-display__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 12px;
    pointer-events: none;
}

.media-viewer {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    outline: none;
}

.media-viewer.hidden {
    display: none;
}

.media-viewer__mask {
    position: absolute;
    inset: 0;
    background: rgba(20, 16, 38, 0.65);
}

.media-viewer__panel {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: #fff;
}

.media-viewer__body img,
.media-viewer__body video {
    max-width: 90vw;
    max-height: 70vh;
    border-radius: var(--radius-md);
    object-fit: contain;
    background: #000;
}

.media-viewer__close {
    position: absolute;
    top: -36px;
    right: 0;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

.media-viewer__caption {
    text-align: center;
    font-size: 14px;
}
.media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: rgba(255, 122, 183, 0.12);
    color: var(--gray-500);
    font-size: 13px;
}
.analytics-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.analytics-card {
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analytics-list--compact {
    padding-left: 16px;
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--gray-500);
}

.analytics-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    color: var(--gray-500);
}

.analytics-tags span {
    background: var(--gray-100);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.chart-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 122, 183, 0.15);
    border-radius: 999px;
    overflow: hidden;
}

.chart-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
    border-radius: inherit;
}

.chart-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.chart-ring svg {
    width: 100%;
    height: 100%;
}

.chart-ring path {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
}

.chart-ring path.bg {
    stroke: rgba(255, 122, 183, 0.2);
}

.chart-ring path.progress {
    stroke: var(--pink-500);
    transition: stroke-dasharray 0.6s ease;
}

.chart-ring strong {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    color: var(--pink-600);
}

.analytics-list {
    margin: 0;
    padding-left: 18px;
    color: var(--gray-500);
    line-height: 1.8;
}

.table-scroll {
    overflow-x: auto;
}

.data-table--wide {
    min-width: 960px;
}

.data-table--wide th,
.data-table--wide td {
    white-space: nowrap;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 14px;
}

.data-table thead {
    background: rgba(255, 122, 183, 0.12);
    color: var(--pink-600);
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 122, 183, 0.1);
    text-align: left;
}

.role-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
}

.role-list li {
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

.log-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--gray-500);
}

.log-time {
    font-size: 12px;
    color: var(--pink-500);
    margin-right: 12px;
}

.log-content {
    font-size: 14px;
}
.avatar-upload {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-upload__preview {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 122, 183, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.avatar-upload__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.avatar-upload input[type="file"] {
    flex: 1;
}
.required {
    color: var(--pink-600);
}
